<div class="card" id="roomAdd">
	<div class="card-block">
		<form class="room-add-form" id="roominfo" enctype="multipart/form-data">
			<div class="row">
				<div class="col-sm-6">
					<div class="input-group">
						<span class="input-group-addon"> 酒店名称 </span>
						<div class="form-group">
						<span class="form-control" th:text="${hotel.hotelName}"></span>
						<!-- <input type="text" name="hotelName" id="hotelName"
							class="form-control"> --> <i class="form-group__bar"></i>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="input-group">
						<span class="input-group-addon"> 房间名称 </span>
						<div class="form-group">
						<input type="text" name="roomId" id="roomId" th:value="${roomInfo.roomId}" hidden>
						<input type="text" name="name" id="name" th:value="${roomInfo.name}" class="form-control">
						<i class="form-group__bar"></i>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="input-group">
						<span class="input-group-addon"> 房间介绍 </span>
						<div class="form-group">
							<textarea id="summary" name="summary" th:text="${roomInfo.summary}" class="form-control"></textarea>
							<i class="form-group__bar"></i>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="input-group">
						<span class="input-group-addon"> 入住人数上限</span>
						<div class="form-group">
							<input type="text" name="residentLimit" onkeyup="value=value.replace(/[^\d]/g,'')" th:value="${roomInfo.residentLimit}" id="residentLimit"
								class="form-control"> <i class="form-group__bar"></i>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-11">
					<div class="input-group">
						<span class="input-group-addon"> 房间原价 </span>
						<div class="form-group">
							<input type="text" name="originalPrice" onkeyup="value=value.replace(/[^\d]/g,'')" th:value="${roomInfo.originalPrice}" id="originalPrice"
								class="form-control"> <i class="form-group__bar"></i>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="input-group">
						<span class="input-group-addon"> 房型总数量 </span>
						<div class="form-group">
							<input type="text" name="roomNum" onkeyup="value=value.replace(/[^\d]/g,'')" th:value="${roomInfo.roomNum}" id="roomNum"
								class="form-control"> <i class="form-group__bar"></i>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-11">
					<div class="input-group">
						<span class="input-group-addon"   style='padding: 8.5px 13px!important;'> 房间设施 </span>
						<div class="form-group facilities" style="margin-top:0.5rem;">
							<input id="facilities" type="hidden" th:value="${roomInfo.facilities}" >
							<label th:each="fac:${facDicts}" class='custom-control custom-checkout'>
								<input name='facilities' type='checkbox' th:value='${fac.keyy}' class='custom-control-input'>
								<span class='custom-control-indicator'></span>
								<span th:text="${fac.valuee}" class='custom-control-description'></span>
							</label>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-9">
					<div class="input-group">
						<span class="input-group-addon" style='padding: 8.5px 13px!important;'> 房间图片 </span>
						<span class="input-group-addon">
							<div style="border:0;width:100px;height:30px;position: relative; margin-right:30px;line-height:30px;text-align:center;position: relative;border-radius:5px;background:#32c787;color:#fff;">
					      		上传图片
		           				<input accept=".JPG,.PNG" type="file"  style="border:0;width:100px;height:30px;position: absolute;left:0;top:0;opacity:0;filter:alpha(opacity=0);" id="picList" data-type="roomList" name="file" multiple onchange="checkPicListForm(this)"/>
		            		</div>
		            	</span>
		            	<div id="newlistUrl">
			            	<div style='width:80px;height:80px;position: relative;float:left;margin-right:6px;' id="allListUrl" th:if="${roomInfo.picture}">
				            	<img style='float: left;' width='80' height='80' th:src="${'http://images.haoyizhu.cn'+roomInfo.picture.picUrl}" />
								<span style='position:absolute;right:-4px;top:-3px;display:block;width:20px;height:20px;border-radius:10px;background:lemonchiffon;text-align:center;line-height:20px;color:red;font-size:14px;cursor: pointer;' class='remImg'>X</span>
								<input type='hidden' th:value="${roomInfo.picture.picUrl}"/>
								<input type='hidden' id='piclistId' th:value="${roomInfo.picture.picId}"/>
			            	</div>
		            	</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-9">
					<div class="input-group">
						<span class="input-group-addon" style='padding: 8.5px 13px!important;'> 详情图片 </span>
						<span class="input-group-addon">
							<div style="border:0;width:100px;height:30px;position: relative; margin-right:30px;line-height:30px;text-align:center;position: relative;border-radius:5px;background:#32c787;color:#fff;">
					      		上传图片
		           				<input accept=".JPG,.PNG" type="file" style="border:0;width:100px;height:30px;position: absolute;left:0;top:0;opacity:0;filter:alpha(opacity=0);" data-type="roomInfo" id="picInfo" name="files" multiple onchange="checkPicInfoForm(this)"/>
		            		</div>
		            	</span>
		            	<input type='hidden' id='pcount' value='0' />
		            	<div id="oldRoomUrl">
			            	<div style='width:80px;height:80px;position: relative;float:left;margin-right:6px;' th:each="pic:${roomInfo.pictures}"  th:if="${roomInfo.pictures}">
			            		<img width='80' height='80' th:src="${'http://images.haoyizhu.cn'+pic.picUrl}" />
								<span style='position:absolute;right:-4px;top:-3px;display:block;width:20px;height:20px;border-radius:10px;background:lemonchiffon;text-align:center;line-height:20px;color:red;font-size:14px;cursor: pointer;' class='remImg'>X</span>
								<input type='hidden' th:value="${pic.picUrl}"/>
								<input type='hidden' class='pid' th:value="${pic.picId}"/>
			            	</div>
			            </div>
			            <div id="newRoomUrl">
		            	</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-11">
					<div class="input-group">
						<span class="input-group-addon payType" style='padding: 8.5px 13px!important;'> 支付方式 </span>
						<div class="form-group"  style="margin-top:0.5rem;">
							<input id="stype" type="hidden" th:value="${roomInfo.payType}" >
							<label class='custom-control' onclick="hiddenNotCancle()">
								<input name='payType' type='radio' value='1' checked="checked"/>
								<span class='custom-control-description'>到店支付</span>
							</label>
							<!-- <label class='custom-control'>
								<input name='payType' type='radio' value='2'/>
								<span class='custom-control-description'>担保（支付首晚）</span>
							</label> -->
							<label class='custom-control' onclick="showNotCancle()">
								<input name='payType' type='radio' value='3'/>
								<span class='custom-control-description'>全额支付（全部房费）</span>
							</label>
						</div>
					</div>
				</div>
			</div>
			<!-- 早餐政策 1、不含早餐 2、免费单早餐3、免费双早餐 -->
			<div class="row">
				<div class="col-sm-11">
					<div class="input-group">
						<span class="input-group-addon payType" style='padding: 8.5px 13px!important;'> 含早政策 </span>
						<div class="form-group"  style="margin-top:0.5rem;">
							<label class='custom-control'>
								<input name='polBreakfast' type='radio' value='1'  th:checked="${roomInfo.polBreakfast eq null || roomInfo.polBreakfast eq '1' }"/>
								<span class='custom-control-description'>不含早餐</span>
							</label>
							<label class='custom-control'>
								<input name='polBreakfast' type='radio' value='2'  th:checked=" ${roomInfo.polBreakfast eq '2'}"/>
								<span class='custom-control-description'>免费单早餐</span>
							</label>
							<label class='custom-control'>
								<input name='polBreakfast' type='radio' value='3'  th:checked=" ${roomInfo.polBreakfast eq '3'} "/>
								<span class='custom-control-description'>免费双早餐</span>
							</label>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="input-group">
						<span class="input-group-addon policies" style='padding: 8.5px 13px!important;'> 房间政策 </span>
						<div class="form-group" style="margin-top:0.5rem;">
							<input id="policies" type="hidden" th:value="${roomInfo.policies}" >
							<label th:each="pol:${polDicts}" class='custom-control custom-checkout'>
								<input name='policies' type='checkbox' th:value='${pol.keyy}' class='custom-control-input'>
								<span class='custom-control-indicator'></span>
								<span th:text="${pol.valuee}" class='custom-control-description'></span>
							</label>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div class="modal-footer" id="roomButton">
        <button class="btn btn-save" id="room-save-button" name="save">保存</button>
		<button class="btn btn-secondary btn-close" onclick="cancleEdit()">取消</button>
    </div>
</div>
<script data-th-src="@{js/app/hotel/hotel/jquery.form.js}"></script>
<script data-th-src="@{js/app/hotel/hotel/roomAdd.js}"></script>
<script data-th-src="@{js/app/hotel/hotel/roomEdit.js}"></script>